package com.ruoyi.project.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.system.mapper.SysWorkerMoneyMapper;
import com.ruoyi.project.system.domain.SysWorkerMoney;
import com.ruoyi.project.system.service.ISysWorkerMoneyService;

/**
 * 余额明细Service业务层处理
 * 
 * @author jjp
 * @date 2020-04-27
 */
@Service
public class SysWorkerMoneyServiceImpl implements ISysWorkerMoneyService 
{
    @Autowired
    private SysWorkerMoneyMapper sysWorkerMoneyMapper;

    /**
     * 查询余额明细
     * 
     * @param moneyId 余额明细ID
     * @return 余额明细
     */
    @Override
    public SysWorkerMoney selectSysWorkerMoneyById(Long moneyId)
    {
        return sysWorkerMoneyMapper.selectSysWorkerMoneyById(moneyId);
    }

    /**
     * 查询余额明细列表
     * 
     * @param sysWorkerMoney 余额明细
     * @return 余额明细
     */
    @Override
    public List<SysWorkerMoney> selectSysWorkerMoneyList(SysWorkerMoney sysWorkerMoney)
    {
        return sysWorkerMoneyMapper.selectSysWorkerMoneyList(sysWorkerMoney);
    }

    /**
     * 新增余额明细
     * 
     * @param sysWorkerMoney 余额明细
     * @return 结果
     */
    @Override
    public int insertSysWorkerMoney(SysWorkerMoney sysWorkerMoney)
    {
        sysWorkerMoney.setCreateTime(DateUtils.getNowDate());
        return sysWorkerMoneyMapper.insertSysWorkerMoney(sysWorkerMoney);
    }

    /**
     * 修改余额明细
     * 
     * @param sysWorkerMoney 余额明细
     * @return 结果
     */
    @Override
    public int updateSysWorkerMoney(SysWorkerMoney sysWorkerMoney)
    {
        return sysWorkerMoneyMapper.updateSysWorkerMoney(sysWorkerMoney);
    }

    /**
     * 批量删除余额明细
     * 
     * @param moneyIds 需要删除的余额明细ID
     * @return 结果
     */
    @Override
    public int deleteSysWorkerMoneyByIds(Long[] moneyIds)
    {
        return sysWorkerMoneyMapper.deleteSysWorkerMoneyByIds(moneyIds);
    }

    /**
     * 删除余额明细信息
     * 
     * @param moneyId 余额明细ID
     * @return 结果
     */
    @Override
    public int deleteSysWorkerMoneyById(Long moneyId)
    {
        return sysWorkerMoneyMapper.deleteSysWorkerMoneyById(moneyId);
    }
}
